<template>
	<!-- <view> -->
		<!-- <rich-text class="page" :nodes="content" ></rich-text> -->
	<!-- </view> -->
	<web-view src="http://www.shiyijia.vip/user.html" v-if="style==1"></web-view>
	<web-view src="http://www.shiyijia.vip/privacyPolicy.html" v-else-if="style==2"></web-view>
</template>

<script>
	
	export default {
		
		data() {
			return {
				content:'',
				style: 1
			};
		},
		onLoad(opts) {
			this.query = opts;
			if (this.query.event == 'user') {
				uni.setNavigationBarTitle({
					title:'用户协议'
				});
				// this.getPrivacy('user/privacyaccord');
				this.style = 1
			} else if (this.query.event == 'privacy') {
				uni.setNavigationBarTitle({
					title:'隐私政策'
				});
				// this.getPrivacy('user/privacyaccord');
				this.style = 2
			}
		},
		methods: {
			getPrivacy(agreement){
				this.http.post(agreement).then(res=>{
					console.log('隐私---',res);
					if(res.code ==1){
						 let data = res.data;
						 this.content = data.content;
					}else{
						
					}	
				})
			}	
		}
	}
</script>

<style lang="scss">
	.page{
		display: flex;
		padding: 20rpx;
	}
</style>